package com.sh.工厂模式.simplefactory;

import com.sh.工厂模式.ICourse;
import com.sh.工厂模式.JavaCourse;

public class SimpleCourseFactoryTest {
    public static void main(String[] args) {
        SimpleCourseFactory simpleCourseFactory = new SimpleCourseFactory();
        ICourse java = simpleCourseFactory.create("java");
        java.study();


        ICourse k = new SimpleCourseFactory().createK("com.sh.工厂模式.JavaCourse");
        k.study();


        ICourse iCourse = simpleCourseFactory.create(JavaCourse.class);
        iCourse.study();
    }
}
